#pragma once

#include "../umlmodel_global.h"

#include "Element.h"

namespace uml {

/// <summary>
/// Image
/// Physical definition of a graphical image.
/// </summary>
class UMLMODEL_EXPORT Image : public Element {

public: // Constructors and destructors
    explicit Image(const QString& umlType="uml::Image");

public: // JsonSerializable override
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    void toJson(QJsonObject& json) override;

public: // Properties
    /// <summary>
    /// content getter
    /// This contains the serialization of the image according to the format. The value
    /// could represent a bitmap, image such as a GIF file, or drawing 'instructions'
    /// using a standard such as Scalable Vector Graphic (SVG) (which is XML based).
    /// </summary>
    QString content() const;

    /// <summary>
    /// content setter
    /// This contains the serialization of the image according to the format. The value
    /// could represent a bitmap, image such as a GIF file, or drawing 'instructions'
    /// using a standard such as Scalable Vector Graphic (SVG) (which is XML based).
    /// </summary>
    void setContent(const QString& value);

    /// <summary>
    /// format getter
    /// This indicates the format of the content, which is how the string content should
    /// be interpreted. The following values are reserved: SVG, GIF, PNG, JPG, WMF, EMF,
    /// BMP. In addition the prefix 'MIME: ' is also reserved. This option can be used
    /// as an alternative to express the reserved values above, for example "SVG" could
    /// instead be expressed as "MIME: image/svg+xml".
    /// </summary>
    QString format() const;

    /// <summary>
    /// format setter
    /// This indicates the format of the content, which is how the string content should
    /// be interpreted. The following values are reserved: SVG, GIF, PNG, JPG, WMF, EMF,
    /// BMP. In addition the prefix 'MIME: ' is also reserved. This option can be used
    /// as an alternative to express the reserved values above, for example "SVG" could
    /// instead be expressed as "MIME: image/svg+xml".
    /// </summary>
    void setFormat(const QString& value);

    /// <summary>
    /// location getter
    /// This contains a location that can be used by a tool to locate the image as an
    /// alternative to embedding it in the stereotype.
    /// </summary>
    QString location() const;

    /// <summary>
    /// location setter
    /// This contains a location that can be used by a tool to locate the image as an
    /// alternative to embedding it in the stereotype.
    /// </summary>
    void setLocation(const QString& value);

private: // Fields
    /// <summary>
    /// content
    /// This contains the serialization of the image according to the format. The value
    /// could represent a bitmap, image such as a GIF file, or drawing 'instructions'
    /// using a standard such as Scalable Vector Graphic (SVG) (which is XML based).
    /// </summary>
    const static QString content_default_;
    QString content_= content_default_;

    /// <summary>
    /// format
    /// This indicates the format of the content, which is how the string content should
    /// be interpreted. The following values are reserved: SVG, GIF, PNG, JPG, WMF, EMF,
    /// BMP. In addition the prefix 'MIME: ' is also reserved. This option can be used
    /// as an alternative to express the reserved values above, for example "SVG" could
    /// instead be expressed as "MIME: image/svg+xml".
    /// </summary>
    const static QString format_default_;
    QString format_= format_default_;

    /// <summary>
    /// location
    /// This contains a location that can be used by a tool to locate the image as an
    /// alternative to embedding it in the stereotype.
    /// </summary>
    const static QString location_default_;
    QString location_= location_default_;

};

} // namespace uml
